#include "StdAfx.h"
#include "Log.h"
#include <iostream>
using namespace std;

CLog::log_ptr CLog::m_pInstance;
boost::mutex CLog::m_lock;

CLog::log_ptr CLog::GetInstance()
{
  boost::mutex::scoped_lock lock(m_lock);
  if(NULL == m_pInstance)
    m_pInstance.reset(new CLog);

  return m_pInstance;
}

void CLog::AddLog(const string& strLog)
{
  boost::mutex::scoped_lock lock(m_lock);
  cout << strLog << endl;
}